﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using iLangl.Model;
using System.Data;

namespace iLangl.BusinessModel.DAL
{
	public interface IPluginDAL
	{
		/// <summary>
		/// Create Plugin License
		/// </summary>
		/// <param name="plugRegistration">Plugin Registration Request</param>
		/// <returns>License Key</returns>
		String CreatePluginLicense(PluginRegistration plugRegistration, String userAccountId, IDbTransaction transaction);
		/// <summary>
		/// Register Plugin
		/// </summary>
		/// <param name="plugin">Plugin Information</param>
		void RegisterPlugin(PluginData plugin, IDbTransaction transaction);
		/// <summary>
		/// Read Information About Plugin
		/// </summary>
		/// <param name="ID">Plugin Id</param>
		/// <returns>Plugin Info</returns>
		PluginData ReadPlugin(String ID);
		/// <summary>
		/// Read plugin license
		/// </summary>
		/// <param name="ID">Plugin license Id</param>
		/// <returns>Plugin License Info</returns>
		PluginLicense ReadLicense(String ID);


		/// <summary>
		/// Read license by user Account
		/// </summary>
		/// <param name="userAccountId"></param>
		/// <returns></returns>
		PluginLicense ReadLicenseByUserAcount(string userAccountId);

		/// <summary>
		/// Read License by Company Id 
		/// </summary>
		/// <param name="companyID"></param>
		/// <returns></returns>
		PluginLicense ReadLicenseByCompanyId(string companyID);
		
	}
}
